void DragCoordinates(X1, Y1, X2, Y2, Time)
|
|
|
|
|
|
|
Command to perform drag action based on start coordinates (X,Y) and end coordinates (X,Y) on the device reflection.
Drag base on coordinates
int X1: X coordinate starting point of where you want to start the drag
int Y1: Y coordinate starting point of where you want to start the drag
int X2: X coordinate starting point of where you want to end the drag
int Y2: Y coordinate starting point of where you want to end the drag
int Time: Time for the command to be executed (in milliseconds)
Note: You can use the p2cx p2cy commands [links] for absolute values not depend on a specific device.
Scenario: In the following example, we will use the dragCoordinates to drag the safari icon to the dock of the screen.
Before Dragging the application, screen will look like this:
Perform a continuous click on the Safari icon to make it draggable.
Run the command with the following values:
Parameters set to:
x1 - 636
y1 - 826
x2 - 572
y2 - 1166
time - 2000
These values were pull from the debug tab. For more information, see
Width/Height
.
Result after command ends:
client.dragCoordinates(636, 826, 572, 1166, 2000);client.DragCoordinates(636, 826, 572, 1166, 2000);client.DragCoordinates 636, 826, 572, 1166, 2000self.client.dragCoordinates2(636, 826, 572, 1166, 2000)$client->dragCoordinates2(636, 826, 572, 1166, 2000);